package cn.iocoder.yudao.module.eval.dal.mysql.filingmanagement;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.eval.dal.dataobject.filingmanagement.FilingManagementDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.eval.controller.admin.filingmanagement.vo.*;

/**
 * 备案管理 Mapper
 *
 * @author 龙头企业
 */
@Mapper
public interface FilingManagementMapper extends BaseMapperX<FilingManagementDO> {

    default PageResult<FilingManagementDO> selectPage(FilingManagementPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FilingManagementDO>()
                .likeIfPresent(FilingManagementDO::getName, reqVO.getName())
                .eqIfPresent(FilingManagementDO::getExaminerNames, reqVO.getExaminerNames())
                .eqIfPresent(FilingManagementDO::getSupervisorNames, reqVO.getSupervisorNames())
                .eqIfPresent(FilingManagementDO::getCertificationScheme, reqVO.getCertificationScheme())
                .eqIfPresent(FilingManagementDO::getStatus, reqVO.getStatus())
                .eqIfPresent(FilingManagementDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(FilingManagementDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FilingManagementDO::getId));
    }

}